package com.activiti.tool;

import org.activiti.engine.*;

/**
 * 生成activiti的25张表
 * @author ldanniel
 */
public class GenerateTables {
    public static void main(String[] args) {
        // 使用自定义方式创建
        // 构建processEngineConfiguration
       ProcessEngineConfiguration configuration = ProcessEngineConfiguration.createProcessEngineConfigurationFromResource("activiti.cfg.xml");
        //或者使用第二种方式，配置文件+beanName (processEngineConfiguration)
//        ProcessEngineConfiguration configuration = ProcessEngineConfiguration.createProcessEngineConfigurationFromResource("activiti.cfg.xml","processEngineConfiguration");
        //通过processEngineConfiguration构建ProcessEngine，并创建数据库
        ProcessEngine processEngine = configuration.buildProcessEngine();
        System.out.println(processEngine);


        HistoryService historyService = processEngine.getHistoryService();
        System.out.println(historyService);
        RepositoryService repositoryService = processEngine.getRepositoryService();
        System.out.println(repositoryService);
        ManagementService managementService = processEngine.getManagementService();
        System.out.println(managementService);

    }
}
